body, html { margin: 0; padding: 0; height: 100%; }

html {
  font-size: 16px;
}

section, article { display: block; padding: 0; }

body {
  background: #444;
  font: 100%/1.5 'Source Sans Pro', AvenirNext-Regular, Corbel, "Lucida Grande", "Trebuchet Ms", sans-serif;
  color: #fff;
}

article .CodeMirror {
  height: 400px;
}

p {
  margin-top: 0;
}

p,
#nav ul a.active,
#nav ul a:hover,
h1, h2, h3 {
  letter-spacing: 1px;
  word-spacing: -1px;
}

form ~ p { margin-top: 2em; }

h1, h2, h3 {
  font-weight: 300;
  margin-bottom: .7em;
}

h1 { font-size: 140%; }
h2 { font-size: 120%; }
h3 { font-size: 110%; margin-right: 1rem;}

article > h2:first-child, section:first-child > h2 { margin-top: 0; }

#nav h1 {
  margin-right: 12px;
  margin-top: 0;
  margin-bottom: 2px;
  color: #fff;
  letter-spacing: 1px;
}

a,
.quasilink {
  /* color: #A21313; */
  color: #fff;
  text-decoration: none;
}

em {
  padding-right: 2px;
}

.quasilink {
  cursor: pointer;
}

article {
  max-width: 700px;
  margin: 0 0 0 160px;
  border-left: 2px solid #3c3c3c;
  border-right: 1px solid #3c3c3c;
  padding: 30px 50px 100px 50px;
  background: #333;
  z-index: 2;
  position: relative;
  min-height: 100%;
  box-sizing: border-box;
}

#nav {
  position: fixed;
  padding-top: 30px;
  padding-right: 1rem;
  max-height: 100%;
  max-height: 100%;
  box-sizing: -moz-border-box;
  box-sizing: border-box;
  overflow-y: auto;
  left: 0; right: none;
  width: 160px;
  text-align: right;
  z-index: 1;
}

@media screen and (min-width: 1000px) {
  article {
    margin: 0 auto;
  }
  #nav {
    right: 50%;
    width: auto;
    border-right: 349px solid transparent;
  }
}

#nav ul {
  display: block;
  margin: 0; padding: 0;
  margin-bottom: 32px;
}

#nav li {
  display: block;
  margin-bottom: 3px;
}

#nav li ul {
  font-size: 80%;
  margin-bottom: 0;
  display: none;
}

#nav li.active ul {
  display: block;
}

#nav li li a {
  padding-right: 20px;
  display: inline-block;
}

#nav ul li {
  font-weight: 400;
}

#nav ul a {
  color: black;
  padding: .125em 1em;
  font-weight: 400;
}

#nav ul a.active, #nav ul a:hover {
  border-bottom: 1px solid #fff;
  margin-bottom: -1px;
  color: #fff;
  font-weight: 300;
}

#logo {
  border: 0;
  margin-right: 12px;
  margin-bottom: 25px;
}

section {
  border-top: 1px solid #E30808;
  margin: 1.5em 0;
}

section.first {
  border: none;
  margin-top: 0;
}

#demo {
  position: relative;
}

#demolist {
  position: absolute;
  right: 5px;
  top: 5px;
  z-index: 25;
}

.yinyang {
  position: absolute;
  top: -10px;
  left: 0; right: 0;
  margin: auto;
  display: block;
  height: 120px;
}

.actions {
  margin: 1em 0 0;
  min-height: 100px;
  position: relative;
}

.actionspicture {
  pointer-events: none;
  position: absolute;
  height: 100px;
  top: 0; left: 0; right: 0;
}

.actionlink {
  pointer-events: auto;
  font-family: arial;
  font-size: 80%;
  font-weight: bold;
  position: absolute;
  top: 0; bottom: 0;
  line-height: 1;
  height: 1em;
  margin: auto;
}

.actionlink.download {
  color: white;
  right: 50%;
  margin-right: 13px;
  text-shadow: -1px 1px 3px #b00, -1px -1px 3px #b00, 1px 0px 3px #b00;
}

.actionlink.fund {
  color: #b00;
  left: 50%;
  margin-left: 15px;
}

.actionlink:hover {
  text-decoration: underline;
}

.actionlink a {
  color: inherit;
}

.actionsleft {
  float: left;
}

.actionsright {
  float: right;
  text-align: right;
}

@media screen and (max-width: 800px) {
  .actions {
    padding-top: 120px;
  }
  .actionsleft, .actionsright {
    float: none;
    text-align: left;
    margin-bottom: 1em;
  }
}

th {
  text-decoration: underline;
  font-weight: normal;
  text-align: left;
}

#features ul {
  list-style: none;
  margin: 0 0 1em;
  padding: 0 0 0 1.2em;
}

#features li:before {
  content: "-";
  width: 1em;
  display: inline-block;
  padding: 0;
  margin: 0;
  margin-left: -1em;
}

.rel {
  margin-bottom: 0;
}
.rel-note {
  margin-top: 0;
  color: #555;
}

pre {
  font-family: Consolas, Menlo, Monaco, "Courier New", Monospace;
  padding-left: 15px;
  border-left: 2px solid #ddd;
}

code {
  padding: 0 2px;
}

strong {
  text-decoration: underline;
  font-weight: normal;
}

.field {
  border: 1px solid #A21313;
}

/* Container used for styling the custom select, the buttom class adds the bg gradient, corners, etc. */
.dropdown {
  position: relative;
  display:block;
  margin-top:0.5em;
  padding:0;
}

/* This is the native select, we're making everything the text invisible so we can see the button styles in the wrapper */
.dropdown select {
  width:100%;
  margin:0;
  background:none;
  border: 1px solid transparent;
  outline: none;
  /* Prefixed box-sizing rules necessary for older browsers */
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  /* Remove select styling */
  -moz-appearance: none;
  -webkit-appearance: none;
  /* Magic font size number to prevent iOS text zoom */
  font-size: 1.25em;
  /* General select styles: change as needed */
  font-weight: 400;
  color: #444;
  padding: .6em 1.9em .5em .8em;
  line-height:1.3;
}
.dropdown select, label, input, textarea, button, option {
  font: 1.25em/1.3 'Source Sans Pro', AvenirNextCondensed-DemiBold, Corbel, "Lucida Grande","Trebuchet Ms", sans-serif;
}

/* Custom arrow sits on top of the select - could be an image, SVG, icon font, etc. or the arrow could just baked into the bg image on the select */

.dropdown::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 8px;
  top: 50%;
  right: 1em;
  margin-top:-4px;
  z-index: 2;
  background: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 12'%3E%3Cpolygon fill='rgb(102,102,102)' points='8,12 0,0 16,0'/%3E%3C/svg%3E") 0 0 no-repeat;
  /* These hacks make the select behind the arrow clickable in some browsers */
  pointer-events:none;
}

/* This hides native dropdown button arrow in IE 10/11+ so it will have the custom appearance, IE 9 and earlier get a native select */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
  .dropdown select::-ms-expand {
    display: none;
  }
  /* Removes the odd blue bg color behind the text in IE 10/11 and sets the text to match the focus style text */
  select:focus::-ms-value {
    background: transparent;
    color: #222;
  }
}

/* Firefox >= 2 -- Older versions of FF (v2 - 6) won't let us hide the native select arrow, so we'll just hide the custom icon and go with native styling */
/* Show only the native arrow */
body:last-child .dropdown::after, x:-moz-any-link {
  display: none;
}
/* reduce padding */
body:last-child .dropdown select, x:-moz-any-link {
  padding-right: .8em;
}

/* Firefox 7+ -- Will let us hide the arrow, but inconsistently (see FF 30 comment below). We've found the simplest way to hide the native styling in FF is to make the select bigger than its container. */
/* The specific FF selector used below successfully overrides the previous rule that turns off the custom icon; other FF hacky selectors we tried, like `*>.dropdown::after`, did not undo the previous rule */

/* Set overflow:hidden on the wrapper to clip the native select's arrow, this clips hte outline too so focus styles are less than ideal in FF */
_::-moz-progress-bar, body:last-child .dropdown {
  overflow: hidden;
}
/* Show only the custom icon */
_::-moz-progress-bar, body:last-child .dropdown:after {
  display: block;
}
_::-moz-progress-bar, body:last-child .dropdown select {
  /* increase padding to make room for menu icon */
  padding-right: 1.9em;
  /* `window` appearance with these text-indent and text-overflow values will hide the arrow FF up to v30 */
  -moz-appearance: window;
  text-indent: 0.01px;
  text-overflow: "";
  /* for FF 30+ on Windows 8, we need to make the select a bit longer to hide the native arrow */
  width: 110%;
}

/* At first we tried the following rule to hide the native select arrow in Firefox 30+ in Windows 8, but we'd rather simplify the CSS and widen the select for all versions of FF since this is a recurring issue in that browser */
/* @supports (-moz-appearance:meterbar) and (background-blend-mode:difference,normal) {
.dropdown select { width:110%; }
}   */


/* Firefox 7+ focus style - This works around the issue that -moz-appearance: window kills the normal select focus. Using semi-opaque because outline doesn't handle rounded corners */
_::-moz-progress-bar, body:last-child .dropdown select:focus {
  outline: 2px solid rgba(180,222,250, .7);
}


/* Opera - Pre-Blink nix the custom arrow, go with a native select button */
x:-o-prefocus, .dropdown::after {
  display:none;
}


/* Hover style */
.dropdown:hover {
  border:1px solid #888;
}

/* Focus style */
select:focus {
  outline:none;
  box-shadow: 0 0 1px 3px rgba(180,222,250, 1);
  background-color:transparent;
  color: #222;
  border:1px solid #aaa;
}


/* Firefox focus has odd artifacts around the text, this kills that */
select:-moz-focusring {
  color: transparent;
  text-shadow: 0 0 0 #000;
}

option {
  font-weight: 400;
}

/* These are just demo button-y styles, style as you like */
.button {
  border: 1px solid #bbb;
  border-radius: .3em;
  box-shadow: 0 1px 0 1px rgba(0,0,0,.04);
  background: #f3f3f3; /* Old browsers */
  background: linear-gradient(to bottom, #ffffff 0%,#e5e5e5 100%); /* W3C */
}

::-webkit-scrollbar {
    width: .75em;
    height: .75em;
    background-color: #111;
}

::-webkit-scrollbar-track {
    box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
    border-radius: 2px;
    background-color: #404040;
}

::-webkit-scrollbar-thumb {
    border-radius: 2px;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
    background-color: #666;
}

::-webkit-scrollbar-corner,
.CodeMirror-scrollbar-filler,
.CodeMirror-gutter-filler{
  background: #333 !important;
}

::-webkit-scrollbar-thumb:window-inactive {
    background-color: #111;
}
